<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sq="http://www.w3.org/1999/html">
<head>
  <th:block th:include="include :: header"/>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
  <div class="ibox float-e-margins">

    <div class="ibox-content">
      <form id="searchForm" name="searchForm" role="form" class="sq-searchForm">
        <div class="row">
          <div class="col-sm-3" barCode>
            <div class="form-group">
              <input type="text" placeholder="请输入用户名" name="userName" class="form-control">
            </div>
          </div>
          <div class="col-sm-3" barCode>
            <div class="form-group">
              <input type="text" name="methodName" placeholder="请输入操作事项" class="form-control">
            </div>
          </div>
          <div class="col-sm-3" barCode>
            <div class="form-group">
              <input placeholder="操作时间起" class="form_datetime form-control" name="startTime" id="startTime"
                     onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
            </div>
          </div>
          <div class="col-sm-3" barCode>
            <div class="form-group">
              <input placeholder="操作时间止" class="form_datetime form-control" name="endTime" id="endTime"
                     onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
            </div>
          </div>
          <div class="col-sm-3" barCode>
            <div class="form-group">
              <sq:select name="status" dicCode="1030" pleaseChoose="执行结果"/>
            </div>
          </div>

          <div class="col-sm-9" align="right">
            <button onclick="search()" class="btn btn-primary" type="button">
              <i class="fa fa-search"></i>&nbsp;搜索
            </button>
            <button onclick="reset()" class="btn btn-primary btn-outline" type="button">
              <i class="fa fa-recycle"></i>&nbsp;重置
            </button>
          </div>
        </div>
      </form>
    </div>
    <div class="ibox-content">
      <div class="row row-lg">
        <div class="col-sm-12">
          <div class="example-wrap">
            <!--<div id="toolbar" class="form-group sq-toolbar">
              <button onclick="rod('101411')" class="btn btn-w-m btn-success" type="button">人工抬前杆</button>
              <button onclick="rod('101412')" class="btn btn-w-m btn-info" type="button">人工抬后杆</button>
              <button onclick="rod('101417')" class="btn btn-w-m btn-warning" type="button">时序重置</button>
            </div>-->
            <div class="example" style="margin-top: -20px;">
              <table id="dataTable" style="table-layout: fixed;"></table>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    const requestPath = parent.api.sys.log
    let columns = [
        {
            field: "select",
            checkbox: true,//选择框
            align: "center",//水平
            valign: "middle"//垂直
        },
        /*{
            title: '账号',
            field: 'username',
            width: 80
        },*/
        {
            title: '用户名',
            field: 'createUserName',
            width: 100
        },
        {
            title: '操作事项',
            field: 'methodsName',
            width: 100
        },
       /* {
            title: '操作方法',
            field: 'methods',
            width: 280
        },*/
        {
            title: '用户IP',
            field: 'userIp',
            width: 100
        },
        {
            title: '执行时间',
            field: 'createTime',
            formatter: function (value, row, index) {
                return value ? value.replace("T", " ") : '-'
            },
            width: 120
        },
        {
            title: '执行时长(ms)',
            field: 'times',
            width: 100
        },
        {
            field:'status',
            title:'执行结果',
            formatter:function(value,row,index){
                return parent.formartDic(value,"1030");
            }
            ,width: 80
        }
    ]
    $(function () {
        initTable(columns)
    })

</script>
</body>
</html>